package controller

import (
	"fmt"
	"go-bookstore/dao"
	"net/http"
)

func Login(w http.ResponseWriter, r *http.Request) {
	username := r.PostFormValue("username") // 获取用户名
	password := r.PostFormValue("password") // 获取密码
	user, _ := dao.CheckUserNameAndPassword(username, password)
	fmt.Fprintf(w, user.Username)
}
